/**
 *@author qzg
 *@description
 *@createDate 2022年06月23日 10:58:01 星期四
 */
import Joi from 'joi'
import Router from 'koa-router'
import { deleteFile, upload } from '../controller'
import idempotent from '../middlewares/redlock'
import validate from '../middlewares/validator'

const router = new Router()
router.prefix('/public')
router.post('/upload', idempotent(), upload)
router.delete('/delete', validate({ url: Joi.string().required() }), deleteFile)
export default router
